home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / utility / utilcli / reqch.lha / ReqCh / ReqCh.doc next >
Text File  |  1996-10-26  |  3KB  |  71 lines

  1.  
  2. ****************************************************************************
  3.  
  4. REQUESTCHOICE a replacement written by: Joerg Riemer             [23-oct-96]
  5. -------------                           Schottmüllerstr.107
  6.                                         14167 Berlin Germany
  7.  
  8.                                  EMail: mission@cs.tu-berlin.de
  9.  
  10. ****************************************************************************
  11.  
  12. dear user
  13. about two weeks i own also a new Amiga 1200 with kickstart V3.1.
  14. i looked out whats new with this nice machine and checked some various
  15. programs found on the harddisk. for example the iconeditor - great key
  16. binding includes - (NICE!!) :). or requestfile which lets user open up
  17. easly an asl-requester (WOW!!). but requestchoice won't work :(
  18.  
  19. so i touched in deeper and the result is a new requestchoice command
  20.  
  21. this command is a replacement for c:requestchoice, to be found in your
  22. directory since the os changes to V39. there are a couple of bugs in
  23. it which makes it unuseable. copy the new command over your old version
  24. and create some proper batchscript which use it to find out how great
  25. it can work.
  26.  
  27. ----------------------------------------------------------------------------
  28. to get a different to the original command the internal
  29. name was changed to [ReqCh] and the version was updated from 39.4 to 40.1
  30.  - because it needed 7'th sources to got a bug free version of ReqCh -
  31. ----------------------------------------------------------------------------
  32.  
  33. BUGS in the original requestchoice and why it won't work:
  34.  
  35. requestchoice uses the dos function (setioerr) to set the selected gadget
  36. number as the result2 variable, but it never returns. the reason for this
  37. is, the result2 variable depends on the returncode a program leaves in D0.
  38. a successful exit with a cleared returnregister signals the shell_process
  39. to clear the result2 variable also. that's why you never get a result2 value.
  40.  
  41. [it can be a bug or not. in that state it's a point of view]
  42.  
  43. in my opinion it's right to clear this variable also. because the result2
  44. variable is further to explain an improved error information and not for
  45. handling own used variable values.
  46.  
  47. to fix this, the new (requestchoice) will return the number of the
  48. selected gadget in a new local variable called "ReqChGG"
  49.  
  50. the result2 value will only be set if the program fails for other reasons.
  51.  
  52. ----------------------------------------------------------------------
  53. for example: look at the demo.script how to get the selected gadget id.
  54. ----------------------------------------------------------------------
  55.  
  56. other bugs i found:
  57.                                ****************************
  58. it steals memory               *** UUHH!!! WHAT A SHAME ***
  59. (yeah, you read right)         ****************************
  60.  
  61. every reference manual 3rd edition WARNS you IN BIG LETTERS to check out
  62. for unfreed memory (ONE OF THE MAJOR BUGS) after running new programs.
  63. (simply using avail flush to compare memory before and after)
  64. and now that monkey business. SORRY, but the guy programmed this tool
  65. must be very stoned while he hacked this (piece). hack it don't smoke it :)
  66.  
  67. it allocs memory about exec(allovec)-but don't frees them at the end
  68. the same occures for dos(readargs)-don't removed on exit (very business like)
  69.  
  70. anyway, all bugs removed and i hope so there is nothing more
  71.